package com.nondo.dean.platform.model;

import javax.validation.constraints.NotNull;

import com.nondo.dean.common.tool.BeanUtils;
import com.nondo.dean.platform.domain.Customer;

public class ActivityCustomer {
    private Integer id;

    private String name;

    private String phone;

    private Integer userId;

    @NotNull(message = "活动ID不能为空")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @NotNull(message = "客户名称不能为空")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    @NotNull(message = "客户电话不能为空")
    public void setPhone(String phone) {
        this.phone = phone;
    }

    @NotNull(message = "商户ID不能为空")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public static Customer copyFrom(ActivityCustomer activityCustomer) {
        Customer customer = new Customer();
        BeanUtils.copy(activityCustomer, customer);
        customer.setActivityId(activityCustomer.getId());
        return customer;
    }
}
